package com.example.park2212.fgviewmodel

import androidx.lifecycle.MutableLiveData
import com.example.lib_base.entity.AnnouncementBean
import com.example.lib_base.entity.HomeEntityResult
import com.example.lib_base.entity.HomeEntityResultItem
import com.example.lib_base.mvvm.BaseViewModel
import com.example.lib_base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class HomeViewModel @Inject constructor (val apiService: ApiService):BaseViewModel() {


    val homeSuccess = MutableLiveData<HomeEntityResult>()
    fun home(userId:Int){
        httpRequest({
            apiService.getHome(userId)
        },{homeSuccess.value = it})
    }

}